#include "rigidbody.h"

using namespace m3d;

SVector3F	SRigidBody::GetVelocity()					const	{ return Force.Velocity;				};
SVector3F	SRigidBody::GetAcceleration()				const	{ return Force.Acceleration;			};
SVector3F	SRigidBody::GetRotation()					const	{ return Force.Rotation;				};
float		SRigidBody::GetInverseMass()				const	{ return Mass.InverseMass;				};
float		SRigidBody::GetLinearDamping()				const	{ return Mass.LinearDamping;			};
float		SRigidBody::GetAngularDamping()				const	{ return Mass.AngularDamping;			};
SMatrix3	SRigidBody::GetInverseAngularMassTensor()	const	{ return Mass.InverseAngularMassTensor;	};

void SRigidBody::SetVelocity( float x, float y, float z )			{ Force.Velocity		= SVector3F(x,y,z);	};
void SRigidBody::SetVelocity( const SVector3F& v )					{ Force.Velocity		= v;				};
void SRigidBody::SetAcceleration( float x, float y, float z )		{ Force.Acceleration	= SVector3F(x,y,z);	};
void SRigidBody::SetAcceleration( const SVector3F& a )				{ Force.Acceleration	= a;				};
void SRigidBody::SetRotation( float x, float y, float z )			{ Force.Rotation		= SVector3F(x,y,z);	};
void SRigidBody::SetRotation( const SVector3F& r )					{ Force.Rotation		= r;				};
void SRigidBody::SetInverseMass( float m )							{ Mass .InverseMass		= m;				};
void SRigidBody::SetLinearDamping( float d )						{ Mass .LinearDamping	= d;				};
void SRigidBody::SetAngularDamping( float d )						{ Mass .AngularDamping	= d;				};
void SRigidBody::SetInverseAngularMassTensor( const SMatrix3& m )	{ Mass .InverseAngularMassTensor = m;		};
